<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
<ui:composition>
      <p:dataTable var="stored" value="#{product.elements}" 
         paginator="true" rows="20" 
         id="productList">
         
         <p:column headerText="#{msg['crud.column.action']}"
            style="width: 170px;">
            <h:link outcome="product.jsf" style="padding: 4px 12px;" 
         		class="grid-link ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left" 
            	value="#{msg['crud.edit']}" >
            	<f:param name="product" value="#{stored.code}" />
         	</h:link> 
 
            <p:commandButton id="remove"
                  icon="ui-icon-trash" 
                  value="#{msg['crud.delete']}" />
         </p:column>
         
         <p:column 
            headerText="#{msg['product.register.label.code']}">
            <h:outputText value="#{stored.code}" />
         </p:column>

         <p:column 
            headerText="#{msg['product.register.label.name']}">
            <h:outputText value="#{stored.name}" />
         </p:column>

         <p:column 
            headerText="#{msg['product.register.label.model']}">
            <h:outputText value="#{stored.model}" />
         </p:column>

         <p:column 
            headerText="#{msg['product.register.label.stock']}">
            <h:outputText value="#{stored.stock}" />
         </p:column>
         <p:column 
            headerText="#{msg['product.register.label.minstock']}">
            <h:outputText value="#{stored.minStock}" />
         </p:column>         
         <p:column 
            headerText="#{msg['product.register.label.price']}">
            <h:outputText value="#{stored.price}" />
         </p:column>         
      </p:dataTable>	
</ui:composition>
</html>
